-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: Fix bug with themes on macOS #10500
Conversation
f841102
to
dcf1b6f
Compare
Ready for review/merge from my end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hoechenberger merge if happy
Thank you, I will have a look this afternoon! In any case, thanks for putting in this effort, @larsoner! |
On macOS, when in system-dark mode you need qdarkstyle to have the light mode CSS for the browser. When in system-light mode, you need qdarkstyle to have the dark mode CSS for the browser. |
(In other words, I think the behavior is expected and installing |
That's unintuitive 😅 |
Yes
This could be useful, feel free to open an issue about this in the mne-qt-browser repo |
FYI it also looks like this problem is fixed on Qt>=5.13, so once we move to PySide6 (hopefully, as our default) the workarounds here to make the toolbar and status bar the correct color won't really be needed anymore. On this PR and mne-tools/mne-qt-browser#104 with PyQt6 (or even on mne-qt-browser
|
@hoechenberger any chance to get this merged? It's blocking #10510 / mne-tools/mne-qt-browser#104 etc. |
thx @larsoner |
* BUG: Fix bug with themes on macOS * TST: Add test * FIX: Simplify * FIX: Fine * FIX: Rerun * FIX: Simpler * FIX: Better separators * FIX: LRU * FIX: Only on < 5.13
* upstream/main: (40 commits) FIX: Flake (mne-tools#10540) FIX: Correct link (mne-tools#10536) DOC: Update installers (mne-tools#10535) ENH: Add dark mode to website (mne-tools#10523) WIP: Copy BEM surfaces by default (don't symlink) (mne-tools#10531) Avoid lowpass=0 in brainvision data (mne-tools#10517) DOC: Update installers [skip azp] [skip actions] (mne-tools#10528) FIX: Fix for old build (mne-tools#10527) Fix line noise at wrong frequencies (mne-tools#10525) FIX : read fids in eeglab (mne-tools#10521) MAINT: Prefer PySide6 in testing (mne-tools#10513) ENH: Add overview_mode support (mne-tools#10501) MRG: Updates for qtpy in mne-qt-browser (mne-tools#10509) BUG: Fix bug with themes on macOS (mne-tools#10500) MAINT: Bump installer links (mne-tools#10511) Add metadata to combine_channels (mne-tools#10504) MAINT: Standardize tests (mne-tools#10502) CI: Test circle (mne-tools#10506) ENH: Use HiDPI splash screen on HiDPI screens (mne-tools#10503) WIP,MNT: Add support for QtPy (mne-tools#10430) ...
@hoechenberger @mscheltienne . This code:
Gives
theme='auto'
theme='dark'
theme='light'
Fixes #10486
Fixes mne-tools/mne-qt-browser#100
The one real downside I think is that when the system is in light mode, dark mode uses the
qdarkstyle
blue-ish dark mode rather than the native macOS dark mode. I think we'd want a PR to qdarkstyle (or something) to try to fix that, as it's probably a large undertaking. In the meantime, this at least gets us closer to native styling on macOS and fixes some bugs.Todo:
theme
is passed (or'auto'
)